package com.spark.starter.inteceptor;

import com.spark.starter.service.IpStarterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.servlet.HandlerInterceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @Author sc
 * @DATE 2024/6/4 23:12
 * @Description:
 * @Version 1.0
 */
public class IpStarterInteceptor implements HandlerInterceptor {

    @Autowired
    private IpStarterService ipStarterService;

    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        ipStarterService.records();
        return Boolean.TRUE;

    }
}
